#include "mythread.h"
#include "../sql/sqlexec.h"

MyThread::MyThread(QObject *parent) : QThread(parent) {}

void MyThread::setDB(SqlExec *db) { _db.reset(db); }

SqlExec *MyThread::getDB() const { return _db.get(); }

size_t MyThread::add() {
  // TODO
  return ++_count;
}

size_t MyThread::get_count() const { return _count; }

size_t MyThread::reduce() {
  // TODO
  if (_count > 0) {
    --_count;
  }
  return _count;
}
